import axios from '~/axios'

// 添加交易申请合同模板
export function addTradeApplicationTemplateContractApi(data) {
    return axios.post('/basic/lindi/tradeApplicationTemplateContract/addTradeApplicationTemplateContract', data)
}

// 删除交易申请合同模板
export function deleteTradeApplicationTemplateContractByTradeApplicationTemplateContractIdApi(contractTemplateId) {
    return axios({
        method: 'DELETE',
        url: '/basic/lindi/tradeApplicationTemplateContract/deleteTradeApplicationTemplateContractByTradeApplicationTemplateContractId',
        params: {
            contractTemplateId: contractTemplateId
        }
    })
}

// 修改交易申请合同模板
export function updateTradeApplicationTemplateContractByTradeApplicationTemplateContractIdApi(data) {
    return axios.put('/basic/lindi/tradeApplicationTemplateContract/updateTradeApplicationTemplateContractByTradeApplicationTemplateContractId', data)
}

// 分页查询交易申请合同模板列表
export function getPageTradeApplicationTemplateContractListApi(params) {
    return axios({
        method: 'GET',
        url: '/basic/lindi/tradeApplicationTemplateContract/getPageTradeApplicationTemplateContractList',
        params: params
    })
}

// 根据ID查询交易申请合同模板详情
export function getTradeApplicationTemplateContractByTradeApplicationTemplateContractIdApi(tradeApplicationTemplateContractId) {
    return axios.get(`/basic/lindi/tradeApplicationTemplateContract/getTradeApplicationTemplateContractByTradeApplicationTemplateContractId/${tradeApplicationTemplateContractId}`)
}

// 生成交易申请合同模板
export function generateTemplateContractApi(params) {
    return axios({
        method: 'POST',
        url: '/basic/lindi/tradeApplicationTemplateContract/generateTemplateContract',
        params: params
    })
}